<template>
  <div class="app-container">
    <div class="btnCss">
      <el-tabs v-model="active" @tab-click="handleClick">
        <el-tab-pane label="待办任务" name="first">
          <network-todo v-if="active == 'first'" :flag='flag'></network-todo>
        </el-tab-pane>
        <el-tab-pane label="已办任务" name="second">
          <network-finished v-if="active == 'second'" :flag='flag'></network-finished>
        </el-tab-pane>
        <el-tab-pane v-if="checkPermi(['workflow:PrivateNetworkMachine:manage'])"  label="专网堡垒机权限申请" name="third">
          <network-gather v-if="active == 'third'" :flag='flag'></network-gather>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import NetworkTodo from '../NetworkMachine/components/networkTodo.vue';
import NetworkGather from '../NetworkMachine/components/networkGather.vue';
import NetworkFinished from '../NetworkMachine/components/networkFinished.vue';

export default {
    name:'PrivateNetworkMachine',
    components: {
      NetworkTodo,
      NetworkGather,
      NetworkFinished
    },
  data() {
    return {
      flag:true,
      active:'first'
    };
    },
    mounted() {
        // 获取按钮元素数组中第一个.click()
  },
  methods: {
    
    handleClick(tab, event) {
      this.active = tab.name
    }
  }
};
</script>
